package net.zhengxinyun.performance.service.login;

import net.zhengxinyun.performance.entity.LoginLog;
import net.zhengxinyun.performance.entity.TokenEntity;
import net.zhengxinyun.performance.entity.UserEntity;
import net.zhengxinyun.performance.filter.UserFilter;
import org.apache.catalina.servlet4preview.http.HttpServletRequest;

import java.util.HashMap;
import java.util.List;

/**
 * @Auther: hyp
 * @Date: 2018/10/30 14:36
 */
public interface UserService {
    int delete(UserEntity userEntity);

    int update(UserEntity userEntity) throws Exception;

    int insert(UserEntity userEntity);

    List<UserFilter> query(UserFilter userFilter);

    UserEntity queryById(Long id);

    Integer queryForCount(UserFilter userFilter);

    List<String> queryForDepartment();

    List<UserFilter> queryUsers(UserFilter userFilter);

    int saveloginLog(LoginLog log);

    List<LoginLog>findByUserId(UserFilter userid);
    int updateByPrimaryKeySelective(UserEntity entity);

    int queryForCountLog(UserFilter userFilter);

    String getCurrentYear();

    UserEntity getUseInfo(Long id);

    String saveUserInfo(UserEntity userEntity, TokenEntity tokenEntity, HttpServletRequest request);

    boolean checkUserIsExist(String userName);
    HashMap<String,List<String>> batchUpdateUser(List<UserFilter> userlist,String checkCode);
    UserFilter selectByUserId(Long id) ;

    UserEntity updateRight(Long id,UserFilter filter);

    UserEntity selectUserByPrimaryKey(Long id);


}
